package win.smartown.android.app.richtexteditor;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import win.smartown.android.library.richtexteditor.RichTextEditor;

public class MainActivity extends AppCompatActivity {

    private RichTextEditor richTextEditor;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        richTextEditor = findViewById(R.id.editor);
    }

    public void preview(View view) {
        Intent intent = new Intent(this, PreviewActivity.class);
        intent.putExtra("content", richTextEditor.getContent());
        startActivity(intent);
    }
}
